package com.dotflat.xj.repository;

import com.dotflat.xj.domain.TargetRecord;
import com.dotflat.xj.po.TargetValueRecordAreaPO;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TargetRecordV2Repository  {

    List<TargetValueRecordAreaPO> getAreaCountResult(String areaId, String startTime,
                                                     String endTime,String type,Integer pageNum,Integer pageSize);

   Integer getAreaCountResult(String areaId, String startTime,
                                                     String endTime,String type);

    Integer getAreaCountResult(String areaId, String startTime,
                               String endTime,String type,String targetClassId,String targetId);

    List<Object[]>  typeNameCount(String ticket, String areaId, String startTime, String endTime);

    List<Object[]>  areaTypeCount( String areaId,String startTime, String endTime);

    List<Object[]>  countResultDetails(String recordId);

    List<Object[]>  countResult(String id,String startTime,String endTime,String type);

    List<Object[]>  countResultArea(String areaId,String startTime,String endTime,String type);

    List<Object[]>  groupTotalCount(String id, String startTime, String endTime);

    List<Object[]>  totalCount(String id, String startTime, String endTime, String sort);
}
